/PROG  PNS0007
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "V214-5100-5200";
PROG_SIZE	= 3390;
CREATE		= DATE 22-07-03  TIME 11:12:42;
MODIFIED	= DATE 24-11-08  TIME 11:29:08;
FILE_NAME	= PNS0049;
VERSION		= 0;
LINE_COUNT	= 122;
MEMORY_SIZE	= 3846;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0019 ;
   7:  !  PART:V214-5100-5200 ;
   8:  !22.7.3************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  R[5:SPEED           ]=10    ;
  24:  OVERRIDE=R[5:SPEED           ] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:   ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED           ] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  54:  R[5:SPEED           ]=100    ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED           ] ;
  57:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT5 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[2] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT60 ACC100 TA R[20]sec,DO[5:TO R23 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P3 PARTS OUT]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  68:   ;
  69:   ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  71:   ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  74:   ;
  75:  TIMER[3]=STOP ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  78:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  79:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  TIMER[3]=START ;
  84:  OVERRIDE=R[5:SPEED           ] ;
  85:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  86:  LBL[51:DROP OR C-P-S] ;
  87:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  88:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  89:  JMP LBL[51] ;
  90:  JMP LBL[50] ;
  91:   ;
  92:  LBL[60:MOVE CLS-PRS-ACC] ;
  93:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  94:  PAUSE ;
  95:  JMP LBL[30] ;
  96:   ;
  97:  LBL[80:DROP ENABLED] ;
  98:  TIMER[3]=START ;
  99:  !PROCEED TO DROP ;
 100:  OVERRIDE=R[5:SPEED           ] ;
 101:J P[10:DROP APPROACH] 100% CNT40 ACC100    ;
 102:  MONITOR END Z_CHECH ;
 103:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 104:  DO[6:PART DROP COMPLETE]=PULSE,0.5sec ;
 105:  PAYLOAD[1] ;
 106:  CALL CHK_DROP    ;
 107:   ;
 108:J P[12:DROP DEPART] 100% CNT70 ACC130 TA    .10sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 109:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 110:  !GOTO PICK POUNCE ;
 111:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 112:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 113:  JMP LBL[10] ;
 114:   ;
 115:  LBL[90:END OF CYCLE] ;
 116:  TIMER[1]=STOP ;
 117:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 118:  MONITOR END MON_PICK ;
 119:J P[1:MIDDLE] 50% CNT100    ;
 120:  MOVE TO HOME    ;
 121:   ;
 122:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z =  -932.000  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2137.430  mm,	Y =  1484.436  mm,	Z =  -936.027  mm,
	W =   179.612 deg,	P =      .337 deg,	R =   144.785 deg,
	E1=   142.026 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2620.815  mm,	Y =  3179.277  mm,	Z =  -934.748  mm,
	W =  -178.921 deg,	P =     -.058 deg,	R =    89.122 deg,
	E1=   195.842 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2620.814  mm,	Y =  3179.278  mm,	Z = -1146.749  mm,
	W =  -178.921 deg,	P =     -.058 deg,	R =    89.122 deg,
	E1=   195.842 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2620.815  mm,	Y =  3179.277  mm,	Z =  -866.349  mm,
	W =  -178.921 deg,	P =     -.058 deg,	R =    89.122 deg,
	E1=   195.842 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2186.839  mm,	Y =  1747.161  mm,	Z =  -873.888  mm,
	W =   177.575 deg,	P =    -1.487 deg,	R =   141.103 deg,
	E1=   142.366 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2035.955  mm,	Y =  -857.015  mm,	Z =  -943.200  mm,
	W =  -179.773 deg,	P =    -1.304 deg,	R =  -161.644 deg,
	E1=    83.643 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2219.556  mm,	Y = -1987.353  mm,	Z =  -980.641  mm,
	W =   179.862 deg,	P =     -.705 deg,	R =  -134.724 deg,
	E1=    57.891 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2663.434  mm,	Y = -3311.802  mm,	Z = -1023.311  mm,
	W =  -179.633 deg,	P =     -.587 deg,	R =   -89.333 deg,
	E1=    14.456 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2663.433  mm,	Y = -3311.803  mm,	Z = -1169.470  mm,
	W =  -179.633 deg,	P =     -.587 deg,	R =   -89.333 deg,
	E1=    14.456 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2663.433  mm,	Y = -3311.802  mm,	Z = -1089.391  mm,
	W =  -179.633 deg,	P =     -.587 deg,	R =   -89.333 deg,
	E1=    14.456 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2134.017  mm,	Y = -1393.875  mm,	Z = -1038.807  mm,
	W =  -178.644 deg,	P =      .047 deg,	R =  -151.525 deg,
	E1=    77.436 deg
};
/END
